package com.tools.demo.sign.utils;


import cn.hutool.core.io.IoUtil;

import java.io.InputStream;
import java.net.URL;

public class HttpsDownload {

    public static byte[] download(String path) throws Exception {
        URL url = new URL(path);
        SslUtils.ignoreSsl();
        InputStream is = url.openStream();
        byte[] bytes = IoUtil.readBytes(is);
        return bytes;
    }

    public static void main(String[] args) throws Exception {
        byte[] b = download("https://172.18.111.251:8201/ESS/file/sealFilePath/2021030516?name=TRAfTsOzll3eIxVa-ZepAa-4QkxqMONsa39ynFM8F4MCa.ofd");
        System.out.println(b);
    }

}
